<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ include file="/commons/jsp/taglibs.jsp"%>
<%@taglib prefix="frame" uri="http://www.framework.com/taglib"%>
<html>
  <head>
	<title>公共平台 </title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<!-- 样式文件的引入 -->
	<link href="${ctx}/commons/css/style.css" rel="stylesheet" type="text/css"/>
	<link rel="stylesheet" type="text/css" href="${ctx}/commons/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="${ctx}/commons/themes/icon.css">
	<!-- jqueryUI JS文件的引入 -->
	<script type="text/javascript" src="${ctx}/commons/js/jquery-1.8.0.min.js"></script>
	<script type="text/javascript" src="${ctx}/commons/js/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="${ctx}/commons/js/easyui-extends-validate.js"></script>
	<!-- jqueryUI国际化 -->
	<script type="text/javascript" src="${ctx}/commons/js/easyui-lang-zh_CN.js"></script>
	<!-- 开发使用的公用js方法 -->
	<script type="text/javascript" src="${ctx}/commons/js/common.js"></script>
	<!-- 开发国际化的引用，主要完成后台信息在前台提示的国际化，一定要放在最后 -->
	<script type="text/javascript">var ctx = '${ctx}';var actionExt = "action";var i18n = new Object();</script>
	<script src="${ctx}/commons/js/i18n/message_zh_CN.js" type="text/javascript"></script>
  </head>
  
  <body>
    <div class="easyui-layout" data-options="fit:true,border:false" >
		<div data-options="region:'north',border:false" style="padding: 4px;height: 50px;overflow: hidden;">
			<div class="easyui-panel" data-options="fit:true,border:true" >
			<div  class="queryContent">
				<form name="searchForm" id="searchGoodsInfoForm" method="post" action="" style="display: none; ">
				<table class="queryTable" >
					<tbody>
						<tr>
							<th width="80%">商品名称</th>
							<td width="10%">
							<input class="easyui-validatebox" type="text" name="goodsName" maxlength="32" style="width:120px"></input></td>
							<th>品牌</th>
							<td width="10%">
							<input class="easyui-validatebox" type="text" name="goodsBrand" maxlength="32" style="width:120px"></input></td>
							<th>规格</th>
							<td width="10%">
							<input class="easyui-validatebox" type="text" name="goodsStandard" maxlength="32" style="width:120px"></input></td>
							<th>型号</th>
							<td width="10%">
							<input class="easyui-validatebox" type="text" name="goodsNum" maxlength="32" style="width:120px"></input></td>
							<td align="right" width="10%"><a href="javascript:void(0);" class="easyui-linkbutton" id="searchGoodsInfo"  plain="true">查询</a>
							<a href="javascript:void(0);" class="easyui-linkbutton" id="resetsearchGoodsInfo" plain="true">清空</a></td>
						</tr>
					</tbody>
				</table>
				</form>
			</div>
			</div>
			</div>
			<div data-options="region:'center',border:false" style="padding: 4px;">
		    <table id="listGoodsInfoTable" class="easyui-datagrid" 
				data-options="singleSelect:true,method:'post',rownumbers:true,fit:true,fitColumns:true,border:true,
					pagination:true,remoteSort:true,multiSort:true,striped:true,onLoadSuccess:function(data){$('#'+goodsInfoParamObj.searchID).attr('disabled',false);},
					url:'${ctx}/business/goodsManage/findAll'"}>
				<thead>
					<tr>
						<th data-options="field:'goodsName',width:100,formatter: function(value,row,index){
								return '<a href=${ctx }/web/goodsInfo?goodsId='+row.id+' target=_blank >'+value+'</a>';
							},title:'商品名称'"></th>
						<th data-options="field:'goodsBrand',width:50,title:'品牌'" align="center"></th>
						<th data-options="field:'goodsStandard',width:50,title:'规格'" align="center"></th>
						<th data-options="field:'goodsNum',width:50,title:'型号'" align="center"></th>
						<th data-options="field:'sellPrice',width:50,title:'售价(元)'" align="center"></th>
						<th data-options="field:'op',sortable:true,width:50,formatter: function(value,row,index){
								return '<a href=${ctx }/web/goodsInfo?goodsId='+row.id+' target=_blank >查看</a>';
							},title:'操作'" align="center"></th>
					</tr>
				</thead>
			</table>
		</div>
	</div>
	<div id="showshopDialog"></div>
</body>
	<script type="text/javascript">
		//初始化表格对应的js对象
		var goodsInfoParamObj;
		$(function() {
			//初始化表格对象数据
			goodsInfoParamObj = new initParams(
					{
						paramObjName : 'goodsInfoParamObj',//表格对应的实体对象名称，好区分多个表格情况下的对象
						tableId:'listGoodsInfoTable',
						searchID:'searchGoodsInfo',
						resetSearchID:'resetsearchGoodsInfo',
						searchFormID:'searchGoodsInfoForm',
						ctx:'${ctx}'
					});
			//初始化查询
			init(goodsInfoParamObj);
			
		});

		function openShopInfo(id){
			top.$('#firstLevelDialog').dialog({    
			    title:'店铺信息',  
			    iconCls:'icon-view',
			    width: 800,    
			    height: 450,    
			    closed: false,    
			    inline : true,
			    cache: false,    
			    href: '${ctx}/business/shop/info?id='+id,    
			    modal: true,
				extractor : function(data){
					if($.trim(data) == "unLogin"){
						var msn = ''||i18n[''];
						msn = msn||i18n[data];
						if(msn != undefined){
							$.messager.alert('提示',msn,'info',function(){top.location='${ctx}/manage';});
							return '';
						}
					}
					return data;
				},
			    buttons : []
			});
		}
	</script>
  </body>
</html>
